package pers.sen.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import pers.sen.health.po.CheckGroup;

/**
 * @author Jason
 * @version 1.0.0
 * @date 2020/11/5 9:05
 * @Description TODO
 */
public interface CheckGroupMapper extends BaseMapper<CheckGroup> {

    @Insert("insert into t_checkgroup_checkitem values (#{gId},#{cId})")
    Boolean insertInfoByGid(@Param("gId") Integer gId, @Param("cId") Integer cId);

    @Select("select CHECKITEM_ID from t_checkgroup_checkitem where CHECKGROUP_ID = #{id}")
    Integer[] findCheckItemInfoByGroupId(@Param("id") int id);

    @Delete("delete from t_checkgroup_checkitem where checkgroup_id = #{checkGroupDTOId}")
    Boolean deleteCheckItemInfoByGId(@Param("checkGroupDTOId") int checkGroupDTOId);
}
